<template>
  <div>
    <el-descriptions :column="2" size="large" class="td-item">
      <el-descriptions-item label-class-name="right-align" class-name="my-content" :label='item.label+"："' v-for='item in baseInfoList' :key="item.value">
        <span class="text--info subtext">{{projectInfo[item.value]}}</span>
      </el-descriptions-item>
    </el-descriptions>
  </div>
</template>

<script lang="ts" setup>
import { ref, watch } from "vue";
import { flowFormArray } from "/@/utils/flowForm";
const props = defineProps({
  projectInfo: {
    type: Object,
    default:()=>{}
  }
});
const baseInfoList = ref([]);

watch(
  () => props.projectInfo,
  newVal => {
    const flowType = props?.projectInfo.flowType;
    if(flowType){
      baseInfoList.value = flowFormArray[flowType].basicInfo
    }
  }
);
</script>

<style lang="scss" scoped>
  .td-item {
    :deep .el-descriptions__cell {
      padding-bottom: 6px;
    }
  }
</style>
